package com.gcl.system;

import java.text.SimpleDateFormat;
import java.util.Date;

 public class Record {
    private Date date;
    private int money;
    private String notes;
    private String category;
    //空参构造
    public Record(){}
     //全参数构造
     public Record(Date date, int money, String notes, String category) {
         this.date = date;
         this.money = money;
         this.notes = notes;
         this.category = category;
     }
     //get set
     public Date getDate() {
         return date;
     }

     public void setDate(Date date) {
         this.date = date;
     }

     public int getMoney() {
         return money;
     }

     public void setMoney(int money) {
         this.money = money;
     }

     public String getNotes() {
         return notes;
     }

     public void setNotes(String notes) {
         this.notes = notes;
     }

     public String getCategory() {
         return category;
     }

     public void setCategory(String category) {
         this.category = category;
     }

     @Override
     public String toString() {
         return "日期：" + new SimpleDateFormat("yyyy-MM-dd").format(date) + ", 金额：" + money + ", 类别：" + category + ", 备注：" + notes;
     }
 }

